package com.yxq.springboot.dao;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.yxq.springboot.bean.SpringBootUserLog;

/**
 * 
 * @ClassName: SpringBootUserLogDao
 * @Description:
 * @author xiaoqun.yi yixq@doordu.com
 * @date 2017年3月31日 上午10:09:34
 * @version V1.3
 */
public interface SpringBootUserLogDao extends
		JpaRepository<SpringBootUserLog, Integer> {

	/**
	 * @param string
	 * @return
	 */
	@Query(value = "select u from  SpringBootUserLog u where u.userName=?1")
	List<SpringBootUserLog> findByUserName(String userName);

	/**
	 * @param string
	 * @param string2
	 * @return
	 */
	List<SpringBootUserLog> findByUserNameAndUserIp(String string,
			String string2);

	/**
	 * @param exampl
	 * @param pageable
	 * @return
	 */
	Page<SpringBootUserLog> findByUserName(String userName, Pageable pageable);

}
